package com.server.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.server.entity.UpmsUser;
import com.server.param.UpmsUserVo;
import com.server.util.Result;
import com.baomidou.mybatisplus.extension.service.IService;
import com.server.vo.upms.user.UserInfo;
import com.server.vo.upms.login.LoginVo;

import java.util.List;
/**
 * <p>
 * 用户 服务类
 * </p>
 *
 * @author
 * @since 2020-04-03
 */
public interface IUpmsUserService extends IService<UpmsUser> {

	/**
     * 新增
     * @param vo
     * @return
     * @author
     * @Date 2020-04-03
     */
    public Result add(UpmsUserVo vo);

    /**
     * 批量删除
     * @param ids
     * @return
     * @author
     * @Date 2020-04-03
     */
    public Boolean delete(String ids);

    /**
     * 更新
     * @param vo
     * @return
     * @author
     * @Date 2020-04-03
     */
    public Result update(UpmsUserVo vo);

    /**
     * 根据id查询列表
     * @param id
     * @return UpmsUser
     * @author
     * @Date 2020-04-03
     */
    public UpmsUser findById(String id);


    /**
     * 查询分页数据
     * @param page
     * @return
     * @author
     * @Date 2020-04-03
     */
     public Result<List<UpmsUser>> findPage(Page<UpmsUser> page, QueryWrapper<UpmsUser> q);

    /**
     * 启用禁用
     * @param ids
     * @return
     * @author
     * @Date 2020-04-03
     */
    Result enable(String ids, Integer enable);

    /**
     * 后台用户登录
     * @param vo
     * @return
     * @Date 2020-04-23
     */
    Result<UserInfo> login(LoginVo vo);


}
